/*
 *File: BlockGroup.h
 *Authors: Diane, Dan, and Tim
 *Created Oct 2012
 */
#ifndef _BLOCKGROUP_H
#define _BLOCKGROUP_H

#include <stdio.h>
#include "Disk.h"
#include "BlockLinkedList.h"
#include "FreeList.h"
#include "BadNumberofBlocksException.h"


class BlockGroup : public BlockLinkedList{
public:
	// new BlockGroup
	BlockGroup(BlockLinkedList *bll);

	// Re open a BlockGroup
	BlockGroup(unsigned int startBlock, unsigned int endBlock,
			unsigned int numberOfBlocks, 
			BlockLinkedList *motherFreeList);

	// add another (empty) block to the end of this BlockGroup
	// from the FreeList. You need to make the blocks
	// left in it before calling this method.
	bool AddBlock();

	// Sets the free list for this BlockGroup.
	void SetFreeList(BlockLinkedList *motherFreeList);

private:
	BlockLinkedList* blockLinkedList;
protected:
	friend class FreeList;

};


#endif
